Optimal. Leaf size=134 \[ 8 i a^4 x+\frac {4 i a^4 \cot (c+d x)}{d}+\frac {8 a^4 \log (\sin (c+d x))}{d}-\frac {i a \cot ^3(c+d x) (a+i a \tan (c+d x))^3}{3 d}-\frac {\cot ^4(c+d x) (a+i a \tan (c+d x))^4}{4 d}+\frac {\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 134, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {3629, 3626,
3623, 3612, 3556} \begin {gather*} \frac {4 i a^4 \cot (c+d x)}{d}+\frac {8 a^4 \log (\sin (c+d x))}{d}+8 i a^4 x+\frac {\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}-\frac {\cot ^4(c+d x) (a+i a \tan (c+d x))^4}{4 d}-\frac {i a \cot ^3(c+d x) (a+i a \tan (c+d x))^3}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3556
Rule 3612
Rule 3623
Rule 3626
Rule 3629
Rubi steps
\begin {align*} \int \cot ^5(c+d x) (a+i a \tan (c+d x))^4 \, dx &=-\frac {\cot ^4(c+d x) (a+i a \tan (c+d x))^4}{4 d}+i \int \cot ^4(c+d x) (a+i a \tan (c+d x))^4 \, dx\\ &=-\frac {i a \cot ^3(c+d x) (a+i a \tan (c+d x))^3}{3 d}-\frac {\cot ^4(c+d x) (a+i a \tan (c+d x))^4}{4 d}-(2 a) \int \cot ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx\\ &=-\frac {i a \cot ^3(c+d x) (a+i a \tan (c+d x))^3}{3 d}-\frac {\cot ^4(c+d x) (a+i a \tan (c+d x))^4}{4 d}+\frac {\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}-\left (4 i a^2\right ) \int \cot ^2(c+d x) (a+i a \tan (c+d x))^2 \, dx\\ &=\frac {4 i a^4 \cot (c+d x)}{d}-\frac {i a \cot ^3(c+d x) (a+i a \tan (c+d x))^3}{3 d}-\frac {\cot ^4(c+d x) (a+i a \tan (c+d x))^4}{4 d}+\frac {\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}-\left (4 i a^2\right ) \int \cot (c+d x) \left (2 i a^2-2 a^2 \tan (c+d x)\right ) \, dx\\ &=8 i a^4 x+\frac {4 i a^4 \cot (c+d x)}{d}-\frac {i a \cot ^3(c+d x) (a+i a \tan (c+d x))^3}{3 d}-\frac {\cot ^4(c+d x) (a+i a \tan (c+d x))^4}{4 d}+\frac {\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}+\left (8 a^4\right ) \int \cot (c+d x) \, dx\\ &=8 i a^4 x+\frac {4 i a^4 \cot (c+d x)}{d}+\frac {8 a^4 \log (\sin (c+d x))}{d}-\frac {i a \cot ^3(c+d x) (a+i a \tan (c+d x))^3}{3 d}-\frac {\cot ^4(c+d x) (a+i a \tan (c+d x))^4}{4 d}+\frac {\cot ^2(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )^2}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.75, size = 245, normalized size = 1.83 \begin {gather*} \frac {a^4 \csc (c) \csc ^4(c+d x) \left (-42 i \cos (c)+38 i \cos (c+2 d x)+18 i \cos (3 c+2 d x)-14 i \cos (3 c+4 d x)+21 \sin (c)+36 i d x \sin (c)+18 \log \left (\sin ^2(c+d x)\right ) \sin (c)+12 \sin (c+2 d x)+24 i d x \sin (c+2 d x)+12 \log \left (\sin ^2(c+d x)\right ) \sin (c+2 d x)-12 \sin (3 c+2 d x)-24 i d x \sin (3 c+2 d x)-12 \log \left (\sin ^2(c+d x)\right ) \sin (3 c+2 d x)-6 i d x \sin (3 c+4 d x)-3 \log \left (\sin ^2(c+d x)\right ) \sin (3 c+4 d x)+6 i d x \sin (5 c+4 d x)+3 \log \left (\sin ^2(c+d x)\right ) \sin (5 c+4 d x)\right )}{12 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 123, normalized size = 0.92
method | result | size |
risch | \(-\frac {16 i a^{4} c}{d}-\frac {4 a^{4} \left (30 \,{\mathrm e}^{6 i \left (d x +c \right )}-63 \,{\mathrm e}^{4 i \left (d x +c \right )}+50 \,{\mathrm e}^{2 i \left (d x +c \right )}-14\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{4}}+\frac {8 a^{4} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) | \(88\) |
norman | \(\frac {-\frac {a^{4}}{4 d}+\frac {7 a^{4} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}-\frac {4 i a^{4} \tan \left (d x +c \right )}{3 d}+\frac {8 i a^{4} \left (\tan ^{3}\left (d x +c \right )\right )}{d}+8 i a^{4} x \left (\tan ^{4}\left (d x +c \right )\right )}{\tan \left (d x +c \right )^{4}}+\frac {8 a^{4} \ln \left (\tan \left (d x +c \right )\right )}{d}-\frac {4 a^{4} \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{d}\) | \(117\) |
derivativedivides | \(\frac {a^{4} \ln \left (\sin \left (d x +c \right )\right )-4 i a^{4} \left (-\cot \left (d x +c \right )-d x -c \right )-6 a^{4} \left (-\frac {\left (\cot ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+4 i a^{4} \left (-\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}+\cot \left (d x +c \right )+d x +c \right )+a^{4} \left (-\frac {\left (\cot ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (\cot ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) | \(123\) |
default | \(\frac {a^{4} \ln \left (\sin \left (d x +c \right )\right )-4 i a^{4} \left (-\cot \left (d x +c \right )-d x -c \right )-6 a^{4} \left (-\frac {\left (\cot ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+4 i a^{4} \left (-\frac {\left (\cot ^{3}\left (d x +c \right )\right )}{3}+\cot \left (d x +c \right )+d x +c \right )+a^{4} \left (-\frac {\left (\cot ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (\cot ^{2}\left (d x +c \right )\right )}{2}+\ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) | \(123\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 96, normalized size = 0.72 \begin {gather*} -\frac {-96 i \, {\left (d x + c\right )} a^{4} + 48 \, a^{4} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 96 \, a^{4} \log \left (\tan \left (d x + c\right )\right ) + \frac {-96 i \, a^{4} \tan \left (d x + c\right )^{3} - 42 \, a^{4} \tan \left (d x + c\right )^{2} + 16 i \, a^{4} \tan \left (d x + c\right ) + 3 \, a^{4}}{\tan \left (d x + c\right )^{4}}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 174, normalized size = 1.30 \begin {gather*} -\frac {4 \, {\left (30 \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} - 63 \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} + 50 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} - 14 \, a^{4} - 6 \, {\left (a^{4} e^{\left (8 i \, d x + 8 i \, c\right )} - 4 \, a^{4} e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, a^{4} e^{\left (4 i \, d x + 4 i \, c\right )} - 4 \, a^{4} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{4}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )\right )}}{3 \, {\left (d e^{\left (8 i \, d x + 8 i \, c\right )} - 4 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, d e^{\left (4 i \, d x + 4 i \, c\right )} - 4 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.73, size = 168, normalized size = 1.25 \begin {gather*} \frac {8 a^{4} \log {\left (e^{2 i d x} - e^{- 2 i c} \right )}}{d} + \frac {- 120 a^{4} e^{6 i c} e^{6 i d x} + 252 a^{4} e^{4 i c} e^{4 i d x} - 200 a^{4} e^{2 i c} e^{2 i d x} + 56 a^{4}}{3 d e^{8 i c} e^{8 i d x} - 12 d e^{6 i c} e^{6 i d x} + 18 d e^{4 i c} e^{4 i d x} - 12 d e^{2 i c} e^{2 i d x} + 3 d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.47, size = 180, normalized size = 1.34 \begin {gather*} -\frac {3 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 32 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 180 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3072 \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + i\right ) - 1536 \, a^{4} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) + 864 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {3200 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 864 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 180 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 32 i \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{4}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4}}}{192 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.01, size = 80, normalized size = 0.60 \begin {gather*} \frac {a^4\,\mathrm {atan}\left (2\,\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,16{}\mathrm {i}}{d}-\frac {-a^4\,{\mathrm {tan}\left (c+d\,x\right )}^3\,8{}\mathrm {i}-\frac {7\,a^4\,{\mathrm {tan}\left (c+d\,x\right )}^2}{2}+\frac {a^4\,\mathrm {tan}\left (c+d\,x\right )\,4{}\mathrm {i}}{3}+\frac {a^4}{4}}{d\,{\mathrm {tan}\left (c+d\,x\right )}^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________